﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="https://cdn.bootcss.com/angular.js/1.6.4/angular.min.js"></script>
	<meta charset="utf-8" />
</head>
<body ng-app="myApp">
    <div ng-controller='MainController'>
        Outside myDirective: {{ myProperty }}
        <input type="text" ng-model="myProperty" name="name" value="" />
        <div my-directive >
            Inside myDirective: {{ myProperty }} 
           
        </div>
    </div>
</body>
</html>
<script>
    angular.module('myApp', [])
.controller('MainController', function ($scope) {
})
.directive('myDirective', function () {
    return {
        restrict: 'A',
        scope: {},
        priority: 100,
        template: ' <input type="text" ng-model="myProperty" name="name" value="" />Inside myDirective, isolate scope: {{ myProperty }}'
    };
});
</script>
